QuickTime 3 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Access Key Functions

QTGetAccessKeys

The QTGetAccessKeys function returns all the application and system access keys of a specified access key type.

pascal OSErr QTGetAccessKeys (Str255 accessKeyType, long flags, QTAtomContainer *keys);
accessKeyType
The type of access keys to return.
flags
Unused; must be set to 0.
keys
A pointer to a QT atom container that contains the keys.

DISCUSSION

The QT atom container returned by this function contains atoms of type kAccessKeyAtomType at the top level. These atoms contain the keys. You can get the key values by using QT atom functions described in "QuickTime Atoms" . In the QT atom container, application keys (which are more likely to be the ones an application needs) appear before system keys.

If there are no access keys of the specified type, the function returns an empty QT atom container.

When your software is done with the QT atom container, it must dispose of it by calling the QTDisposeAtomContainer function.

QTRegisterAccessKey

The QTRegisterAccessKey function registers an access key.

pascal OSErr QTRegisterAccessKey (Str255 accessKeyType, long flags, Handle accessKey);
accessKeyType
The access key type of the key to be registered.
flags
Flags that specify the operation of this function. To register a system access key, set the kAccessKeySystemFlag flag. To register an application access key, set this parameter to 0.
accessKey
The key to be registered.

DISCUSSION

Most access keys are strings. A string stored in the accessKey handle does not include a trailing zero or leading length byte; the length of the string is the size of the handle.

If the access key has already been registered, no error is returned, and the request is simply ignored.

QTUnregisterAccessKey

The QTUnregisterAccessKey function removes a previously registered access key.

pascal OSErr QTUnregisterAccessKey (Str255 accessKeyType, long flags, Handle accessKey);
accessKeyType
The access key type of the key to be removed.
flags
Flags that specify the operation of this function. To remove a system access key, set the kAccessKeySystemFlag flag. To remove an application access key, set this parameter to 0.
accessKey
The key to be removed.

DISCUSSION

Most access keys are strings. A string stored in the accessKey handle does not include a trailing zero or leading length byte.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |